<template>
	<view>
		<view class="page-section page-section-gap" style="text-align: center;">
			<audio style="text-align: left" @error="errcc"  action="audioAction" 
			 src="https://img-cdn-qiniu.dcloud.net.cn/uniapp/audio/music.mp3"   :loop="h" poster="https://p3.music.126.net/WgYF57_qZZNeCVkBhlSBPw==/3233663698049069.jpg?param=300y300" name="消极掰" author="jolin"  controls></audio>
		</view> 
		<view  class="cons">
			
			<button size="mini"  type="primary" @click="huan">循环播放</button> 
		</view>
		{{ errmeg}}<br/>
		 所播放歌曲为：  {{music}}
	</view>
</template>

<script>
	export default {
		data() {
			return {
				music:"",
				h:false,
				errmeg:"",
				
				};
		},
		
		
		onLoad:function(a){
			this.music=a.nusic
		    console.log(a.nusic);
			// uni.request({
			// 	    url:"",
			// 		success:function(music){
			// 			play.current.src=music.url;
			// 			play.current.name=music.name;
			// 			play.current.poster=music.poster;
			// 			play.current.author=music.author;
			// 		}
			// })
		}	,
		methods:{
			
			huan:function(){
				this.h=!this.h;
			},
			errcc:function(e){
				console.log(e);
				  let G=e.detail.errMsg;
				   this.errmeg =G.toLowerCase();
			}
		}
			

	
}	
</script>

<style>
	.cons{
		text-align: center;
	}
	
	
	

</style>
